Sensor measurement verification in quasi real-time

ABSTRACT

A method and system to perform the verification of measures done by a sensor in quasi real-time. The sensor verification may be implemented at two different levels—a functionality level and a measurement level. At the functionality level, a consistency check of information from different variables may be processed at sensor level depending on the functionality of the physical system being measured. At the measurement level, diagnostics may be performed of the circuits present in the measurement path by specific circuitry and at suitable instants of time to guarantee a Fault Tolerant Time Interval while minimizing sample loss. This may be achieved, at least in part, by increasing the measuring sample rate.

TECHNICAL FIELD

The present disclosure relates to a method and system for verifyingmeasurements taken by a sensor in quasi real-time.

BACKGROUND

Modern vehicles include systems having complex electric circuits forperforming different functions. Common circuits include ananalog-to-digital converter (“ADC”) in communication with a sensor. Thesensor measures a physical quantity and generates an analog electricalsignal indicative of the measured physical quantity. The ADC receivesthe analog signal from the sensor and converts it into a digitalelectrical signal (i.e., a digital value, a digital output code, etc.).

Once the analog sensor signal is digitalized, it may be processed by amicrocontroller and/or to be transmitted to other modules through anetwork connection. These ADCs have a programmable ADC conversion rate,but usually they work at a fixed frequency, such as 1 kHz. These devicesalso integrate diagnostic circuits that can monitor the correct behaviorof the internal and external circuits. Current implementations need tostop the measure to perform the diagnostics of the circuitry. When thediagnostics is finished, the ADCs' input data buffers need to be filledagain and, therefore, the system needs to wait n periods until a validsample may be completely processed (or output).

SUMMARY

One or more embodiments of the present disclosure is directed to amethod for verifying sensor measurements of physical variables in asystem. The method may include receiving, during a measurement mode, atleast a first sensor signal indicative of a first variable beingmeasured, a second sensor signal indicative of a second variable beingmeasured, and a third sensor signal indicative of a third variable beingmeasured. The method may also include comparing pairs of measured valuesindicative of the first variable, the second variable, and the thirdvariable to similar pairs of expected values. The expected values may bebased on current system conditions. The method may further compriseinitiating diagnostics of a measurement path for a faulty variable inresponse to two pairs of measured values, each including the faultyvariable, being outside a predetermined range of expected values. Thefaulty variable may be one of the first variable, the second variable,or the third variable. The first variable may be a battery voltage, thesecond variable may be a battery current, and the third variable may bea battery temperature.

Comparing pairs of measured values indicative of the first variable, thesecond variable, and the third variable to similar pairs of expectedvalues, wherein the expected values are based on current systemconditions, may include: comparing a first pair of measured valuesindicative of the first variable and the second variable to a first pairof expected values based on current system conditions; comparing asecond pair of measured values indicative of the first variable and thethird variable to a second pair of expected values based on currentsystem conditions; and comparing a third pair of measured valuesindicative of the second variable and the third variable to a third pairof expected values based on current system conditions.

Initiating targeted diagnostics of a measurement path for a faultyvariable in response to two pairs of measured values, each including thefaulty variable, being outside a predetermined range of expected values,may include initiating diagnostics of a measurement path for the firstvariable in response to the first pair of measured values being outsidea predetermined range of the first pair of expected values and thesecond pair of measured values being outside a predetermined range ofthe second pair of expected values. Alternatively, it may includeinitiating diagnostics of a measurement path for the second variable inresponse to the first pair of measured values being outside apredetermined range of the first pair of expected values and the thirdpair of measured values being outside a predetermined range of the thirdpair of expected values or initiating diagnostics of a measurement pathfor the third variable in response to the second pair of measured valuesbeing outside a predetermined range of the second pair of expectedvalues and the third pair of measured values being outside apredetermined range of the third pair of expected values.

The first sensor signal, the second sensor signal, and the third sensorsignal may all be analog signals. The method may further compriseconverting each analog signal into digital samples measured at anoversampling rate and pre-processing the digital samples to generate adigital output for each analog signal at a target sampling rate, whereinthe oversampling rate is N times the target sampling rate. The digitaloutput may be computed as an average value of up to N previouslymeasured digital samples.

A first digital output following diagnostics may be computed from lessthan N previously measured digital samples. Moreover, diagnostics mayinterrupt the measurement mode. However, no more than one digital outputmay be lost during diagnostics. A digital output lost during diagnosticsmay be replaced by one of a moving average, a previously known goodsample, and a 3-order spline from previous measures.

One or more additional embodiments of the present disclosure is directedto a method for verifying sensor measurements of physical variables in asystem. The method may comprise: receiving at least one sensor signal,each sensor signal indicative of a physical variable being measured;comparing measured values of the at least one sensor signal to expectedvalues, wherein the expected values are based on current systemconditions; detecting whether a diagnostic inhibitor is presentpreventing a diagnostic mode from being initiated; and in the absence ofany diagnostic inhibitors, initiating diagnostics of a measurement pathfor a physical variable in response to one of a) the measured valuesbeing outside a predetermined range of the expected values and b) apredetermined time since the last diagnostic mode has expired.

The physical variable may include at least one of a battery voltage, abattery current, and a battery temperature. Further, the diagnosticinhibitor may include a battery cranking event.

One or more additional embodiments of the present disclosure is directedto a method for real-time diagnosing of an analog sensor measurement.The method may comprise: receiving, during a measurement mode, an analogsignal indicative of a variable being measured; converting the analogsignal into digital samples measured at an oversampling rate;pre-processing the digital samples to generate a digital output at atarget sampling rate, wherein the oversampling rate is N times thetarget sampling rate; and receiving and processing a diagnostic signal,during a diagnostic mode, wherein a last digital output prior to thediagnostic mode is computed from less than N previously measured digitalsamples. A first digital output following the diagnostic mode may becomputed from less than N previously measured digital samples.

The method may further comprise detecting whether a diagnostic inhibitoris present preventing the diagnostic mode from being initiated andinitiating the diagnostic mode in the absence of any diagnosticinhibitors.

Receiving and processing a diagnostic signal may comprise interruptingthe measurement mode to initiate the diagnostic mode, wherein no morethan one digital output at the target sampling rate is lost to thediagnostic mode. The diagnostic mode may be performed using a singlesample of the diagnostic signal and a corresponding digital output atthe target sampling rate may be interpolated from remaining digitalsamples to prevent any loss of digital outputs at the target samplingrate. The corresponding digital output may be interpolated from theremaining digital samples using one of a moving average and a 3-orderspline.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a system for verifying sensor measurements,in accordance with one or more embodiments of the present disclosure;

FIG. 2 is a functional diagram of the system, in accordance with one ormore embodiments of the present disclosure;

FIG. 3 is a signal timing diagram showing samples received from aconverter as compared to samples usable by a controller for an algorithmwhen no oversampling is used;

FIG. 4 is a signal timing diagram showing an example of samples receivedfrom a converter as compared to samples usable by a controller for analgorithm when oversampling is employed, in accordance with one or moreembodiments of the present disclosure;

FIG. 5 is a signal timing diagram showing another example of samplesreceived from a converter as compared to samples usable by a controllerfor an algorithm when oversampling is employed, in accordance with oneor more embodiments of the present disclosure; and

FIG. 6 is a flowchart depicting a method for verifying the correctnessof sensor measurements in quasi real-time, in accordance with one ormore embodiments of the present disclosure.

DETAILED DESCRIPTION

As required, detailed embodiments of the present invention are disclosedherein; however, it is to be understood that the disclosed embodimentsare merely exemplary of the invention that may be embodied in variousand alternative forms. The figures are not necessarily to scale; somefeatures may be exaggerated or minimized to show details of particularcomponents. Therefore, specific structural and functional detailsdisclosed herein are not to be interpreted as limiting, but merely as arepresentative basis for teaching one skilled in the art to variouslyemploy the present invention.

For sensors, such as battery diagnostics sensors (BDS), customers mayrequire an assessment that a system is correctly measuring some physicalvariables (e.g., voltage, current, temperature, or the like) withspecific functional safety characteristics and bounded a Fault TolerantTime Interval (FTTI). The system may assure the functional safety levelnot only in the sensor but also in the values transferred to otherelectronic control units (ECUs) via communication interface.

The FTTI is the time that a fault can be present in a system before ahazard occurs. Therefore, the FTTI represents a total target time thesystem needs to meet in order to transition to a safe state. The system,whenever possible, needs to switch to a safe state within the FTTI. Toensure safety of a system the time to detect a fault (Diagnostic TestInterval) plus the time for the system to achieve a safe state (FaultReaction Time Interval) shall be less than the FTTI for the safety goal,as expressed in the equation below:

FTTI>Diagnostic Test Interval (DTI)+Fault Reaction Time Interval (FRTI)

Many sensors use analog-to-digital converters (ADCs) to digitalize thephysical magnitudes to be processed by a microcontroller and/or to betransmitted to other modules. As previously stated, these ADCs have aprogrammable ADC conversion rate, but usually they work at a fixedfrequency, such as 1 kHz. These devices integrate diagnostics circuitsthat can monitor the correct behavior of the internal and externalcircuits provided in the sensing system.

FIG. 1 shows a block diagram of a system 10, according to one or moreembodiments of the present disclosure. The system 10 may include inputs12 for receiving measurements of physical variables using one or moresensors 14. The sensors 14 measure a physical quantity and generate ananalog electrical signal indicative of the measured physical quantity.The analog inputs may be converted to digital electrical signals (i.e.,a digital value, a digital output code, digital sample, etc.) 16 usingan ADC 18, such as a Sigma-Delta ADC, at a predetermined sample rate.The digital samples 16 may then be received at a pre-processor 20 forpre-processing.

Pre-processing may process the digital samples 16 into usable values ordata for a controller 24, where the digital data may be furtherprocessed according to an algorithm. The pre-processor 20 may determinewhat information is provided to the controller 24. The pre-processeddigital samples may be fed to the controller 24 at a constant rate. Theresults of the algorithm may be output to other electronic control units(ECUs) 26 (i.e., modules, controllers, etc.) through a networkconnection 28. Pre-processed values may also be output directly to otherECUs. The pre-processed values, together with the results of thealgorithm, may be collectively referred to as digital outputs 30. Thesystem may also include a diagnostic circuit 32 that can monitor thebehavior of internal and external circuits and verify that the sensormeasurements are correct.

According an embodiment, one or more of the components described abovemay be integrated with the sensor 14 into a single component. Forinstance, the ADC 18, the pre-processor 20, and/or the diagnosticcircuit 32 may be integrated with the sensor 14 into a single componentthat may be digitally connected to the controller 24 through a networkconnection. In this case, the sensor may provide digital samples oroutputs directly to the controller 24. Accordingly, the sensor signalsmay be analog or digital depending on the application.

To verify the system is measuring correctly, several mechanisms may beavailable. At low level, the hardware could include specific circuitryto diagnose the measurement path (i.e., all elements integrated in thismeasurement path). FIG. 2 is a functional diagram showing details of thesystem 10 in accordance with an embodiment of the present disclosure.The system 10 is enabled to detect the integrity of the sensormeasurements by performing diagnostics of the circuitry.

The system includes a sensor 14. The sensor 14 measures a physicalquantity and generates an analog electrical signal indicative of themeasured physical quantity. The analog signal generated by the sensor 14may be a voltage signal and is designated herein as the sensor inputV_(IN). In alternative or additional embodiments, the analog signalgenerated by the sensor 14 may be a current signal.

The system 10 may further include an analog multiplexor 34. As shown inFIG. 2, the output of the multiplexor 34 may be directly connected tothe input of the ADC 18. The multiplexor 34 may be configured to receivetwo inputs: (i) the sensor input V_(IN) from the sensor 14; and (ii) atest input signal TEST_(IN) from the diagnostic circuit 32. As such, theADC 18 may be multiplexed with two voltages: (i) the input voltage to bemeasured (i.e., the sensor input V_(IN) from the sensor 14); and (ii) atest voltage (i.e., the test input signal TEST_(IN) from the diagnosticcircuit 32). In alternative or additional embodiments, the test inputsignal TEST_(IN) may be a current signal.

The multiplexor 34 may be configured to select one of the sensor inputV_(IN) and the output voltage of the diagnostic circuit TEST_(IN) andforward the selected voltage to the ADC 18 via a buffer 36. Forinstance, at one time, the multiplexor 34 may select the sensor inputV_(IN) and forward the sensor input V_(IN) to the ADC 18. Conversely, atanother time when the diagnostic circuit 32 outputs the test inputsignal TEST_(IN), the multiplexor 34 may select the test voltageTEST_(IN) and forwards the test voltage TEST_(IN) to the buffer 36 forsubsequent transmission to the ADC 18.

In normal operation, when the multiplexor 34 is configured to output thesensor voltage V_(IN), the ADC 18 generates the digital output code forthe sensor input V_(IN) by comparing the sensor input V_(IN) with areference voltage V_(REF) provided by a voltage reference 38. Thevoltage reference 18 may be externally provided to the ADC 18 or may beinternally generated in the ADC itself. The reference voltage V_(REF) isintended to be a precise ‘measuring stick’ against which the sensorinput V_(IN) is compared. Under error free operation, the ADC 18 maygenerate the digital output code for the sensor input V_(IN) accordingto the following equation:

output=V _(IN)*(2^(n) /V _(REF))

where “output” is the digital output code in decimal form and “n” is thenumber of bits of resolution of the ADC. The resolution indicates thenumber of discrete values the ADC can produce over the range of analogvalues. The values are usually stored in binary form so the resolutionis expressed in bits. For example, an ADC with a resolution of eightbits can encode the analog sensor input V_(IN) to one in 256 differentlevels since 2⁸=256.

The system 10 may include a microcontroller, for example, the controller24. As shown in FIG. 2, the output of the ADC 18 may be connected to thecontroller 24 such that the controller receives the digital output codeV_(out) for the sensor input V_(IN) from the ADC 18. The controller 24generally uses the digital output code V_(out) for the sensor inputV_(IN) to control various functions. For instance, in one embodiment,the sensor 14 may generate a sensor input V_(IN) indicative of ameasured physical quantity of a battery of an electric vehicle (notshown) and the controller 24 may control operation of the battery basedon the corresponding digital output code V_(out) for the sensor inputV_(IN).

The controller 24 may generate a control signal NORMAL/TEST to switchbetween a normal measuring mode and a diagnostic mode. The controlsignal NORMAL/TEST may be provided from the controller 24 to themultiplexor 34 as shown in FIG. 2. The selection operation of themultiplexor 34 may select the sensor input V_(IN) while receiving thecontrol signal NORMAL/TEST in a first state (i.e., “NORMAL”). On theother hand, while the control signal NORMAL/TEST is provided from thecontroller 24 to the multiplexor 34 in a second state (i.e., “TEST”),the multiplexor may select the test voltage TEST_(IN). The controlsignal NORMAL/TEST may also be received by the diagnostic circuit 32 totrigger commencement of the diagnostics.

As such, when the diagnostic circuit 32 is controlled per theabove-described operation to generate the test input signal TEST_(IN),the multiplexor 34 selects the test input signal TEST_(IN) instead ofthe sensor input V_(IN) and provides the test input signal TEST_(IN) tothe ADC 18 by way of the buffer 36. In this case, the test input signalTEST_(IN) rather than the sensor input V_(IN) is provided as the analoginput signal to the ADC 18. In turn, the ADC 18 converts this analoginput signal, which during this time is the test input signal TEST_(IN),into a digital output test code TEST_(OUT) using the reference voltageV_(REF).

Alternatively, during normal measurement mode, the multiplexor 34 mayselect the sensor input V_(IN) instead of the test input signalTEST_(IN) and provide the sensor input V_(IN) to the ADC 18. In thiscase, the sensor input V_(IN) is provided to the ADC 18 per conventionalADC operation. In turn, the ADC 18 converts the sensor input V_(IN) intoa digital output code V_(OUT) using the reference voltage V_(REF).

In summary, the system 10 may be configured to provide the sensor inputV_(IN) to the ADC 18 in a normal operating mode. For example, the ADC 18may convert the sensor input V_(IN) into digital samples of voltagevalues such that a desired function is performed for the vehicle. TheADC 18 may include any number of channels to receive any number ofsensor signals. Diagnostics may be performed on a particular channel toverify integrity of the sensor measurements.

Current implementations need to stop the measure of a physical quantityto perform the diagnostics of the circuitry. When the diagnostics isfinished, the ADC's input data buffer 36 needs to be filled again and,therefore, the system needs to wait n periods until a valid sample maybe completely processed (or output). For example, FIG. 3 shows a digitalsignal timing diagram showing digital samples received from a converter(top) as compared to digital outputs usable by a controller for analgorithm (bottom) following pre-processing. As shown, 7-8 samples maybe lost during each diagnostic phase: 3 samples due to change fromnormal measure mode to diagnostics mode, 1-2 samples in the diagnosticsitself, and 3 samples due to change from diagnostics back to normalmeasure mode. The lost samples because of diagnostics result in lostdigital outputs to the algorithm. Therefore, in current implementations,the diagnostics is usually done at specific time instants where thesystem is not working in normal mode and samples can be spared or when apossible error is suspected. This implies a high FTTI.

According to one or more embodiments of the present disclosure, a systemand method to verify the correctness of the measures in quasi real-timemay be implemented at two different levels—a functionality level and ameasurement level. The functionality level may involve a consistencycheck of information from different variables processed at sensor level(e.g., current, voltage, temperature, etc.) depending on thefunctionality of the physical system being measured, such as whether abattery is charging or discharging. The measurement level may involvethe diagnostics of the circuits present in the measurement path byspecific circuitry and at suitable instants of time to guarantee an FTTIwhile minimizing sample loss. This may be accomplished by increasing themeasuring sample rate, as will be described in greater detail below.This, in turn, may reduce the time the diagnostic is active.

The strategy at a higher (or functionality) level may involve thecomputation of a logical function of each pair of physical variablesbeing measured. For instance, in a sensor measuring voltage (V), current(I) and temperature (T), these two-variable pairs are V-I, V-T and I-T.This logical function may compute a 1 if the measured values areconsistent with current system conditions (i.e., the physics andfunctionality of the system being measured). If inconsistencies aredetected, the logical function may compute a 0 and correspondingdiagnostics may be called. As an example, if inconsistencies aredetected in pairs V-I and V-T, but not in I-T, a diagnostic for thevoltage measurement path may be activated. This elimination of errorstrategy may be employed so that the system can react faster duringdiagnostics.

In a case where no inconsistencies are found, the system 10 mayperiodically activate the low-level (i.e., measurement level)diagnostics to guarantee the FTTI. When doing diagnostics, some samplesmay be lost. However, in some situations, it may not be permissible tolose any samples. Accordingly, the higher-level strategy may evaluatethe convenience of starting this diagnostic. This can be done in severalways. For instance, the higher-level functions, such as the energymanagement or the engine control, may not authorize performance oflow-level diagnostics at certain specific moments. As an example, duringengine starts, in order to exactly measure the current cranking profile,diagnostics may not be authorized. Also, the detection of specificevents may inhibit diagnostics from being performed because themeasurement information during those events may have greater importance.These specific events may be referred to herein as diagnosticinhibitors. For example, in a battery sensor, by monitoring voltage andcurrent, the starting of a cranking event could be detected and thediagnostics disabled or prohibited during the duration of this event.Stopping or delaying diagnostics during a cranking event may benecessary because the current information is very useful in monitoringthe internal resistance of the battery.

The measurement level strategy may include deployment of the diagnosticsto verify that the measurements are correct. Since the diagnostics stopsthe actual measurement of a physical variable, the sampling rate of themeasurement may be increased to reduce the time the diagnostics isactive. Increasing the sampling rate of an analog voltage signal abovethe target sampling rate (e.g., the Nyquist rate) may be referred to asoversampling. The target sampling rate may be a sample rate at whichalias-free signal sampling occurs and is based in part on the frequencycomponents of the analog signal being measured. A signal is said to beoversampled by a factor of N if it is sampled at N times the Nyquistrate.

The pre-processor 20 may determine what digital information is providedto the controller 24 or directly to the network 28. The digital outputssent to the controller 24 for processing according to the algorithm orsent directly an ECU 26 may be provided at the target sampling rate.Accordingly, the pre-processor 20 may pre-process the measurements takenat the oversampling rate to generate usable digital outputs 30 for thesystem 10 at the target sampling rate. For example, the pre-processor 20may take the average of the last N digital samples to feed to thecontroller 24.

FIG. 4 shows a digital signal timing diagram of a possibleimplementation with 8:1 oversampling and 1 digital output lost for eachdiagnostic phase. As shown, during normal mode, every 8 digitalmeasurement samples 16 converted at the ADC 18 results in one (1)useable digital output 30 from the pre-processor 20 at the targetsampling rate. That is, only one sample in every 8 is sent to thecontroller 24. The digital output 30 sent from the pre-processor 20 tothe controller 24, for example, may be computed as the average value ofthe 8 previously measured “fresh” measurement samples. When switchingfrom normal mode to diagnostics mode, the first n-samples (e.g., firstthree samples) of the diagnostics at the 8:1 oversampling rate may beunusable (i.e., samples lost) while the input data buffers are beingfilled. The subsequent “diagnostic” samples taken at the oversamplingrate may be used to produce a single digital output for the controller24 during the diagnostic mode to verify the sensor system is measuringcorrectly. Thus, only one digital measurement output sample may be lostduring the diagnostic phase in this example.

The digital outputs lost to diagnostics may be replaced. For instance,the lost digital output in FIG. 4 may be replaced by a moving average(e.g., the unweighted mean of the previous n data samples) or apreviously known good sample/output. Alternatively, the lost output maybe replaced using spline interpolation from previous measures (e.g., a3-order spline). When switching back to normal mode, the first n-samples(e.g., first three samples) of the sensor measurement at the 8:1oversampling rate may be unusable while the input data buffers are againbeing re-filled. Accordingly, the first digital output 30 to thecontroller 24, or algorithm, after the transition to normal mode may becomputed as the average value of fewer than 8 previously measured“fresh” samples. In some circumstances, a delay may be introducedbetween when samples are taken and when the sample average is sent tothe controller 24 for processing by the algorithm. Whether a delay isintroduced, and the amount of the delay, may depend on the measurementapplication and customer requirements. If very fresh measures aredesired, fewer samples may be used when transitioning from thediagnostics mode to reduce any delay. If accuracy is more important than“freshness,” a delay may be introduced in order to utilize more realsamples.

If the diagnostics can be done using a single measurement or sample, itis possible to employ a strategy to avoid any digital output loss. FIG.5 shows a digital signal timing diagram of an alternative implementationwith 8:1 oversampling that avoids any digital output loss. In thisexample, the samples provided to the controller 24 before and after thediagnostics are computed using four “fresh” samples instead of eight“fresh” samples as in normal operation. If “freshness” of the samples isnot mandatory, other strategies may be employed before and afterdiagnostics to replace the measurements while the input data buffersfill. As before, these strategies may involve replacing the unusablesamples with a moving average, previously known good samples, athree-order spline from previous measures, or the like.

The amount of oversampling may depend on the measurement application.Higher oversampling may be required for certain applications. However,increasing oversampling can increase hardware costs and noise in thesignal. Therefore, the oversampling rate may be selected such that itprovides good values and timing for the application, while minimizingnoise and cost.

FIG. 6 is a flowchart depicting a method 600 to verify the correctnessof the sensor measurements in quasi real-time. During a measurementmode, the system 10 may receive measurements of physical variables, asprovided at step 610. For example, the system 10 may receive at leastone sensor signal, each sensor signal indicative of a physical variablebeing measured. In particular, the system 10 may receive a first sensorsignal indicative of a first variable being measured, a second sensorsignal indicative of a second variable being measured, and a thirdsensor signal indicative of a third variable being measured. In abattery monitoring application, the first variable may be a batteryvoltage, the second variable may be a battery current, and the thirdvariable may be a battery temperature.

At step 620, a high-level functionality check may be performed. Forexample, the system 10 may compare measured values of the at least onesensor signal to expected values, wherein the expected values are basedon current system conditions. In one or more embodiments, the system 10may compare pairs of measured values indicative of the first variable,the second variable, and the third variable to similar pairs of expectedvalues, wherein the expected values are based on current systemconditions (i.e., the physics and functionality of the system beingmeasured). This comparison may include: comparing a first pair ofmeasured values indicative of the first variable and the second variableto a first pair of expected values based on current system conditions;comparing a second pair of measured values indicative of the firstvariable and the third variable to a second pair of expected valuesbased on current system conditions; and comparing a third pair ofmeasured values indicative of the second variable and the third variableto a third pair of expected values based on current system conditions.

At step 630, the system 10 may determine whether any inconsistencies aredetected based on the comparison performed during the functionalitycheck in step 620. An inconsistency may be detected when the measuredvalues are outside a predetermined range of the expected values. Forexample, an inconsistency may be detected when two pairs of measuredvalues, each pair having a common variable, are outside a predeterminedrange of expected values. If an inconsistency is detected at step 630,the system 10 may determine whether a diagnostic inhibitor is presentpreventing a diagnostic mode from being initiated, as provided at step640. If a diagnostic inhibitor is present, no diagnostics may be calledand the method may return to step 610 to continue receiving sensormeasurements.

In the absence of any diagnostic inhibitors, the system 10 may initiatelow-level diagnostics, as provided at step 650. For example, the system10 may initiate diagnostics of a measurement path for a physicalvariable in response to one of the measured values being outside apredetermined range of the expected values. In the example of aninconsistency being detected when two pairs of measured values, eachpair having a common variable, are outside a predetermined range ofexpected values, the system 10 may initiate diagnostics targeted for themeasurement path of the common variable (i.e., a faulty variable). Forinstance, the system 10 may initiate diagnostics of a measurement pathfor a faulty variable in response to two pairs of measured values, eachincluding the faulty variable, being outside a predetermined range ofexpected values, the faulty variable being one of the first variable,the second variable or the third variable. More specifically, the system10 may initiate diagnostics of a measurement path for the first variablein response to the first pair of measured values being outside apredetermined range of the first pair of expected values and the secondpair of measured values being outside a predetermined range of thesecond pair of expected values.

In response to the first pair of measured values being outside apredetermined range of the first pair of expected values and the thirdpair of measured values being outside a predetermined range of the thirdpair of expected values, the system 10 may initiate diagnostics of ameasurement path for the second variable. Similarly, the system 10 mayinitiate diagnostics of a measurement path for the third variable inresponse to the second pair of measured values being outside apredetermined range of the second pair of expected values and the thirdpair of measured values being outside a predetermined range of the thirdpair of expected values.

During the diagnostic mode, the system 10 may receive and processdiagnostic signals to verify the measurement path(s) of one or morevariables. As set forth above with reference to FIGS. 4 and 5, receivingand processing the diagnostic signal may interrupt the measurement mode.However, according to one or more embodiments, no more than one digitaloutput at the target sampling rate may be lost to the diagnostic mode.Indeed, the diagnostics signal may be processed in between oversampledmeasurement signals and the corresponding target-rate digital output maybe interpolated from remaining samples to avoid any loss of digitaloutputs to the controller 24.

The system 10 may next determine whether the diagnostics reveals a faultor other error in the measurement path of the physical variable, asprovided at step 660. If a fault is detected, the system 10 may proceedto a step 670, upon which corrective action may be initiated. Thecorrective action may include fixing the fault, notifying other controlunits (e.g., ECUs 26) in communication with the system 10, and/ornotifying a user of the fault. If no fault is detected, the method mayreturn to step 610 to continue receiving sensor measurements.

Returning to step 630, if no inconsistencies are detected, the system 10may determine whether a predetermined time since the last diagnosticmode occurred has expired, as provided at step 680. If the predeterminedtime has not lapsed, the method may return to step 610 to continuereceiving sensor measurements. If the predetermined time has lapsed, thesystem 10 may initiate a periodic diagnostic of a measurement path for aphysical variable, as provided at step 650, in the absence of anydiagnostic inhibitor (step 640).

According to one or more embodiments, the first sensor signal, thesecond sensor signal, and the third sensor signal may all be analogsignals. As previously described, the system 10 may convert each analogsignal into digital samples measured at an oversampling rate using theADC. Moreover, the pre-processor may pre-process the digital samples togenerate a digital output for each analog signal at a target samplingrate. The oversampling rate may be N times the target sampling rate. Thedigital output may be computed as an average value of up to N previouslymeasured digital samples. While the input data buffer fills, a lastdigital output prior to the diagnostic mode may be computed from lessthan N previously measured digital samples. Likewise, a first digitaloutput following diagnostics may be computed from less than N previouslymeasured digital samples.

While exemplary embodiments are described above, it is not intended thatthese embodiments describe all possible forms of the invention. Rather,the words used in the specification are words of description rather thanlimitation, and it is understood that various changes may be madewithout departing from the spirit and scope of the invention.Additionally, the features of various implementing embodiments may becombined to form further embodiments of the invention.

1. A method for verifying sensor measurements of physical variables in asystem, the method comprising: receiving, during a measurement mode, atleast a first sensor signal indicative of a first variable beingmeasured, a second sensor signal indicative of a second variable beingmeasured, and a third sensor signal indicative of a third variable beingmeasured; comparing pairs of measured values indicative of the firstvariable, the second variable, and the third variable to similar pairsof expected values, wherein the expected values are based on currentsystem conditions; and initiating diagnostics of a measurement path fora faulty variable in response to two pairs of measured values, eachincluding the faulty variable, being outside a predetermined range ofexpected values, the faulty variable being one of the first variable,the second variable or the third variable.
 2. The method of claim 1,wherein the first variable is a battery voltage, the second variable isa battery current, and the third variable is a battery temperature. 3.The method of claim 1, wherein comparing pairs of measured valuesindicative of the first variable, the second variable, and the thirdvariable to similar pairs of expected values, wherein the expectedvalues are based on current system conditions, comprises: comparing afirst pair of measured values indicative of the first variable and thesecond variable to a first pair of expected values based on currentsystem conditions; comparing a second pair of measured values indicativeof the first variable and the third variable to a second pair ofexpected values based on current system conditions; and comparing athird pair of measured values indicative of the second variable and thethird variable to a third pair of expected values based on currentsystem conditions.
 4. The method of claim 3, wherein initiating targeteddiagnostics of a measurement path for a faulty variable in response totwo pairs of measured values, each including the faulty variable, beingoutside a predetermined range of expected values, the faulty variablebeing one of the first variable, the second variable or the thirdvariable, comprises: initiating diagnostics of a measurement path forthe first variable in response to the first pair of measured valuesbeing outside a predetermined range of the first pair of expected valuesand the second pair of measured values being outside a predeterminedrange of the second pair of expected values.
 5. The method of claim 3,wherein initiating targeted diagnostics of a measurement path for afaulty variable in response to two pairs of measured values, eachincluding the faulty variable, being outside a predetermined range ofexpected values, the faulty variable being one of the first variable,the second variable or the third variable, comprises: initiatingdiagnostics of a measurement path for the second variable in response tothe first pair of measured values being outside a predetermined range ofthe first pair of expected values and the third pair of measured valuesbeing outside a predetermined range of the third pair of expectedvalues.
 6. The method of claim 3, wherein initiating targeteddiagnostics of a measurement path for a faulty variable in response totwo pairs of measured values, each including the faulty variable, beingoutside a predetermined range of expected values, the faulty variablebeing one of the first variable, the second variable or the thirdvariable, comprises: initiating diagnostics of a measurement path forthe third variable in response to the second pair of measured valuesbeing outside a predetermined range of the second pair of expectedvalues and the third pair of measured values being outside apredetermined range of the third pair of expected values.
 7. The methodof claim 1, wherein the first sensor signal, the second sensor signal,and the third sensor signal are all analog signals, the method furthercomprising: converting each analog signal into digital samples measuredat an oversampling rate; and pre-processing the digital samples togenerate a digital output for each analog signal at a target samplingrate, wherein the oversampling rate is N times the target sampling rate;wherein the digital output is computed as an average value of up to Npreviously measured digital samples.
 8. The method of claim 7, wherein afirst digital output following diagnostics is computed from less than Npreviously measured digital samples.
 9. The method of claim 7, whereindiagnostics interrupts the measurement mode.
 10. The method of claim 9,wherein no more than one digital output is lost during diagnostics. 11.The method of claim 10, wherein a digital output lost during diagnosticsis replaced using one of a moving average, a previously known goodsample, and an interpolation from previous measures.
 12. A method forverifying sensor measurements of physical variables in a system, themethod comprising: receiving at least one sensor signal, each sensorsignal indicative of a physical variable being measured; comparingmeasured values of the at least one sensor signal to expected values,wherein the expected values are based on current system conditions;detecting whether a diagnostic inhibitor is present preventing adiagnostic mode from being initiated; and in the absence of anydiagnostic inhibitors, initiating diagnostics of a measurement path fora physical variable in response to one of a) the measured values beingoutside a predetermined range of the expected values and b) apredetermined time since the last diagnostic mode has expired.
 13. Themethod of claim 12, wherein the physical variable includes at least oneof a battery voltage, a battery current, and a battery temperature. 14.The method of claim 13, wherein the diagnostic inhibitor includes abattery cranking event.
 15. A method for real-time diagnosing of ananalog sensor measurement, the method comprising: receiving, during ameasurement mode, an analog signal indicative of a variable beingmeasured; converting the analog signal into digital samples measured atan oversampling rate; pre-processing the digital samples to generate adigital output at a target sampling rate, wherein the oversampling rateis N times the target sampling rate; and receiving and processing adiagnostic signal, during a diagnostic mode, wherein a last digitaloutput prior to the diagnostic mode is computed from less than Npreviously measured digital samples.
 16. The method of claim 15, whereina first digital output following the diagnostic mode is computed fromless than N previously measured digital samples.
 17. The method of claim15, further comprising: detecting whether a diagnostic inhibitor ispresent preventing the diagnostic mode from being initiated; andinitiating the diagnostic mode in the absence of any diagnosticinhibitors.
 18. The method of claim 15, wherein receiving and processinga diagnostic signal comprises: interrupting the measurement mode toinitiate the diagnostic mode, wherein no more than one digital output atthe target sampling rate is lost to the diagnostic mode.
 19. The methodof claim 18, wherein the diagnostic mode is performed using a singlesample of the diagnostic signal and a corresponding digital output atthe target sampling rate is interpolated from remaining digital samplesto prevent any loss of digital outputs at the target sampling rate. 20.The method of claim 19, wherein the corresponding digital output isinterpolated from the remaining digital samples using one of a movingaverage and a 3-order spline.